<?php
/**
 * 后台管理菜单项
 *
 * @version        $Id: inc_menu.php 1 10:32 2010年7月21日Z tianya $
 * @package        DedeBIZ.Administrator
 * @copyright      Copyright (c) 2022, DedeBIZ.COM
 * @license        https://www.dedebiz.com/license
 * @link           https://www.dedebiz.com
 */
require_once(dirname(__FILE__)."/../config.php");
//载入可发布频道
$addset = '';
//检测可用的内容模型
if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) {
    $admin_catalog = join(',', $admin_catalogs);
    $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype ");
} else {
    $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype ");
}
$dsql->Execute();
$candoChannel = '';
while ($row = $dsql->GetObject()) {
    $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype);
}
if (empty($candoChannel)) $candoChannel = 1;
$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC");
$dsql->Execute('mm');
while ($row = $dsql->GetObject('mm')) {
    $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />";
}
$helpUrl = DEDEBIZURL."/help";
$gitUrl = DEDEBIZURL."/git";
$dedebizUrl = DEDEBIZURL;
$adminMenu1 = $adminMenu2 = '';
if ($cuserLogin->getUserType() >= 10) {
    $adminMenu1 = "
<m:top item='1_7_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'>
<m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' />
<m:item name='自定重要表单' link='diy_main.php' rank='c_List' target='main' />
</m:top>";

$adminMenu2 = "
</m:top>

<m:top item='10_' name='系统设置' display='block' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'>
<m:item name='网站项目配置' link='sys_info.php' rank='sys_Edit' target='main' />
<m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' />
<m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' />
</m:top>";
}

$menusMain = "<m:top item='1_' name='常用操作' display='block'>
<m:item name='网站栏目管理' link='catalog_main.php' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' />
<m:item name='我发布的文章' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' />
<m:item name='用户提现处理' link='jjtixian.php' rank='sys_jjtixian' target='main' />
<m:item name='内容回收站' link='recycling.php' addalt='清空回收站' rank='a_List,a_AccList,a_MyList' target='main' />
</m:top>


$adminMenu1
<m:top item='1_' name='批量维护' display='block'>
<m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' />
<m:item name='搜索词管理' link='search_keywords_main.php' rank='sys_Keyword' target='main' />
<m:item name='数据库替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> 
</m:top>

<m:top item='6_' name='会员管理' display='block' rank='member_List,member_Type'>
<m:item name='用户注册管理' link='member_main.php' rank='member_List' target='main' />
<m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' />
<m:item name='会员价格设置' link='member_type.php' rank='sys_Data' target='main' />
<m:item name='会员订单管理' link='member_operations.php' rank='sys_Data' target='main' />
<m:item name='课程订单管理' link='shops_operations.php' rank='sys_Data' target='main' />
</m:top>

$adminMenu2
-----------------------------------------------
";